Magnetic field sensors (e.g., proximity detectors or rotation detectors) for detecting ferromagnetic articles and/or magnetic articles are known. The magnetic field associated with the ferromagnetic article or magnet is detected by a magnetic field sensing element, such as a Hall element or a magnetoresistance element, which provides a signal (i.e., a magnetic field signal) proportional to a detected magnetic field. In some arrangements, the magnetic field signal is an electrical signal.
The magnetic field sensor processes the magnetic field signal to generate an output signal that changes state each time the magnetic field signal either reaches a peak (positive or negative peak) or crosses a threshold level. Therefore, the output signal, which has an edge rate or period, is indicative of a speed of rotation of the ferromagnetic gear or of the ring magnet.
One application for a magnetic field sensor is to detect the approach and retreat of each tooth of a rotating ferromagnetic or soft ferromagnetic gear. In some arrangements, a ring magnet having magnetic regions (permanent or hard magnetic material) with alternating polarity is coupled to the ferromagnetic gear or is used by itself and the magnetic field sensor is responsive to approach and retreat of the magnetic regions of the ring magnet.
In one type of magnetic field sensor, sometimes referred to as a peak-to-peak percentage detector (or threshold detector), a threshold level is equal to a percentage of the peak-to-peak magnetic field signal. One such peak-to-peak percentage detector is described in U.S. Pat. No. 5,917,320 entitled “Detection of Passing Magnetic Articles While Periodically Adapting Detection Threshold” and assigned to the assignee of the present invention.
Another type of magnetic field sensor, sometimes referred to as a slope-activated detector or as a peak-referenced detector, is described in U.S. Pat. No. 6,091,239 entitled “Detection Of Passing Magnetic Articles With a Peak Referenced Threshold Detector,” which is assigned to the assignee of the present invention. In the peak-referenced magnetic field sensor, the threshold signal differs from the positive and negative peaks (i.e., the peaks and valleys) of the magnetic field signal by a predetermined amount. Thus, in this type of magnetic field sensor, the output signal changes state when the magnetic field signal comes away from a peak or valley by the predetermined amount.
It should be understood that, because the above-described peak-to-peak percentage detector and the above-described peak-referenced detector both have circuitry that can identify the positive and negative peaks of a magnetic field signal, the peak-to-peak percentage detector and the peak-referenced detector both include a peak detector portion adapted to detect positive peaks and negative peaks of the magnetic field signal. Each, however, uses the detected peaks in different ways.
In order to accurately detect the positive and negative peaks of a magnetic field signal, the proximity detector is capable of tracking at least part of the magnetic field signal. To this end, typically, one or more digital-to-analog converters (DACs) can be used to generate a tracking signal, which tracks the magnetic field signal. For example, in the above-referenced U.S. Pat. Nos. 5,917,320 and 6,091,239, two DACs are used, one (PDAC) to detect the positive peaks of the magnetic field signal and the other (NDAC) to detect the negative peaks of the magnetic field signal.
Some types of magnetic field sensors perform one or more types of calibration, typically at a time near to start up or power up of the magnetic field sensor. During one type of calibration, the above-described threshold level is determined.
The above-described types of magnetic field sensors (e.g., proximity detectors and rotation detectors) generate output signals having state transitions at times when the magnetic field signal crosses the threshold determined by the peak detector portion. Detection accuracy can be adversely affected by variations in the magnetic field signal that are attributable to factors other than the passing magnetic article. One source of such magnetic field variations is the spacing (or air gap) between the magnetic article and the magnetic field transducer. Air gap is inversely proportional to the peak-to-peak level of the magnetic field signal, so in small air gap arrangements, the magnetic field signal has a larger peak-to-peak signal level than in larger air gap arrangements.
It can be challenging to choose a threshold signal level that is suitable for both small and large air gap installations. In particular, for larger air gaps, it is desirable for the threshold signal to be at one level to ensure that the comparator output signal switches as desired, whereas, for smaller air gaps, a different threshold signal level is desirable.
Since the above-described types of magnetic field sensors have peak detector portions that accurately position the threshold in accordance with the magnitude of the magnetic field signal, these types of magnetic field sensors tend to have output signals with good edge timing accuracy relative to cycles of the magnetic field signal and for different amplitude magnetic field signals. They also tend to provide a high quality output signal relatively quickly after start tip, e.g., when power is first applied, or when the detected object first starts moving.
The above-described magnetic field sensors having peak detector portions are relatively complex. Simpler magnetic field sensors merely use a fixed threshold with no peak detector portion, and compare the magnetic field signal to the fixed threshold. An output signal is generated having state transitions at times when the magnetic field signal crosses the fixed threshold. This type of magnetic field sensor is low cost, but suffers from having an output signal with less edge timing accuracy and poor start up behavior, e.g., when power is first applied, or when the detected object first starts moving (which may result in a temporary change of air gap). This type of magnetic field sensor also may not be accurate for changes in air gap (e.g., such as may occur as a result in asymmetries of the moving object) or for different initial air gaps between the magnetic field sensing element and a sensed object.
In certain peak-referenced magnetic field sensors, the threshold offset amount is selected at startup in response to a measurement of the peak magnetic field signal level and is fixed for circuit operation thereafter. If the peak magnetic field signal level is greater than a predetermined amount, then a small air gap is presumed and a relatively large threshold offset amount is used. Alternatively, if the peak magnetic field signal level is less than the predetermined amount, then a large air gap is presumed and a smaller threshold offset amount is used.
It would, therefore, be desirable to provide a magnetic field sensor, in particular, a proximity detector or rotation detector, that is simpler, and therefore, less expensive, than the above-described magnetic field sensors that have peak detector portions, yet which has better edge timing accuracy and better start up behavior than the above-described simple magnetic field sensor that uses a fixed threshold, and further that adapts to changes in the magnetic field signal that may occur due to changes in air gap during operation or that may occur in different installations.